package llc.ufwa.unlimitedlist.activities.list;

import llc.ufwa.data.exception.ResourceException;
import llc.ufwa.data.resource.Converter;
import llc.ufwa.unlimitedlist.data.UnlimitedListItem;

public class UnlimitedItemSizeConverter implements Converter<UnlimitedListItem, Integer> {
    
    @Override 
    public Integer convert(
            final UnlimitedListItem old
    ) throws ResourceException {
        
        if(old == null) {
            return 0;
        }
        
        int sum = 48; //starting with bast objects size estimates
        
        return sum;
        
    }

    @Override
    public UnlimitedListItem restore(
        final Integer newVal
    ) throws ResourceException {
        throw new RuntimeException("This should never happen");
    }
    
}
